import React, { useEffect, useRef, useState } from "react";
import { Dimensions, StyleSheet, Text, TouchableOpacity, View } from "react-native";



export default function(props){

  //console.log(props.value,props.active);

  return(
    <TouchableOpacity onPress={() => {
      //console.log('press');
    }}>
      <View style={styles.button}>
        <Text
        style={{
          color:'grey',
          textDecorationLine:props.active?'underline':'none',
          fontSize:30
        }}

        >{props.value}</Text>
      </View>
    </TouchableOpacity>
  )



}

const {height, width} = Dimensions.get('window');
const itemPadding = 10;
const styles = StyleSheet.create({
  button: {
    width: Math.floor(width/6),
    height: 40,
    backgroundColor: '#ffffff',
    marginLeft: itemPadding,
    marginTop: itemPadding,
    overflow: 'hidden', // 切掉多余部分
    borderColor: 'white',
    borderWidth: 0, // 边框宽度为0 + hidden，相当于切成圆角。
    borderRadius: 4, // 圆角
    shadowColor: 'grey', // 添加阴影效果
    shadowOffset: {width: 1, height: 1},
    shadowOpacity: 0.5,
    shadowRadius: 4,
    elevation: 4, // android端要加上这个属性，不然阴影不出来
  }
})
